home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Rinaldi / HC 1.2 & 2.0 / Menu 2.1.cpt / Menu 2.1 / card_4359.txt < prev    next >
Text File  |  1991-08-18  |  14KB  |  640 lines

  1. -- card: 4359 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2661
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on ParseParam Prompt,Default
  8.   put "Menu" && Q(short name of the target) into cd fld "Cmd"
  9.   -- ask for correct number of parameters
  10.   put "," into Cmd
  11.   get empty
  12.   put 0 into Nb
  13.   repeat until (it = "*") or (Nb = number of items of Prompt)
  14.     Ask item Nb + 1 of Prompt with item Nb + 1 of Default
  15.     if the Result is "Cancel"
  16.     then exit to HyperCard
  17.     if it ‚↠empty
  18.     then put quote & it & quote & "," after Cmd
  19.   else get "*"
  20.   add 1 to Nb
  21. end repeat
  22.  
  23. delete last char of cmd
  24. put Cmd after cd fld "Cmd"
  25.  
  26. DoMenuXCMD
  27. end ParseParam
  28.  
  29. on DoMenuXCMD
  30.   -- execute content of field "Cmd"
  31.   do card field "Cmd"
  32.   if the Result ‚↠empty
  33.   then
  34.   if value of word 2 of cd fld "Cmd" is in "List,Find"
  35.   then
  36.   if first word of the Result ‚↠"Error"
  37.   then
  38.   put the Result into cd fld "Result"
  39.   show btn "box"
  40.   show cd fld "Result"
  41. else answer the Result
  42. else answer the Result
  43. end if
  44. end DoMenuXCMD
  45.  
  46. function Q what
  47. return quote & what & quote
  48. end Q
  49.  
  50. on closeCard
  51.   hide btn "Box"
  52.   hide cd fld "REsult"
  53. end closeCard
  54.  
  55.  
  56.  
  57. -- part 1 (field)
  58. -- low flags: 00
  59. -- high flags: 0007
  60. -- rect: left=42 top=5 right=77 bottom=426
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 0
  64. -- font id: 3
  65. -- text size: 10
  66. -- style flags: 0
  67. -- line height: 13
  68. -- part name: MenuDef1
  69.  
  70.  
  71. -- part 2 (field)
  72. -- low flags: 00
  73. -- high flags: 0002
  74. -- rect: left=107 top=315 right=332 bottom=474
  75. -- title width / last selected line: 0
  76. -- icon id / first selected line: 0 / 0
  77. -- text alignment: 0
  78. -- font id: 3
  79. -- text size: 10
  80. -- style flags: 0
  81. -- line height: 13
  82. -- part name: Cmd
  83.  
  84.  
  85. -- part 5 (button)
  86. -- low flags: 00
  87. -- high flags: A004
  88. -- rect: left=78 top=162 right=182 bottom=149
  89. -- title width / last selected line: 0
  90. -- icon id / first selected line: 0 / 0
  91. -- text alignment: 1
  92. -- font id: 3
  93. -- text size: 10
  94. -- style flags: 0
  95. -- line height: 13
  96. -- part name: Install
  97. ----- HyperTalk script -----
  98. on mouseUp
  99.   put "Menu " & Q("Install") into card field "Cmd"
  100.   IF cd fld "MenuDef1" ‚↠empty
  101.   then put  "," & "card field" && Q("MenuDef1") after cd fld "Cmd"
  102.   IF cd fld "MenuDef2" ‚↠empty
  103.   then put  "," & "card field" && Q("MenuDef2") after cd fld "Cmd"
  104.   DoMenuXCMD
  105. end mouseUp
  106.  
  107.  
  108. -- part 6 (button)
  109. -- low flags: 00
  110. -- high flags: A004
  111. -- rect: left=177 top=162 right=182 bottom=248
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 0 / 0
  114. -- text alignment: 1
  115. -- font id: 3
  116. -- text size: 10
  117. -- style flags: 0
  118. -- line height: 13
  119. -- part name: Insert
  120. ----- HyperTalk script -----
  121. on mouseUp
  122.   ParseParam "New item :,Menu name :,Before item name : (* = end),Before subItem" & " name : (* = end)","New Item,MyMenu,Item 1,SubItem 1.1"
  123. end mouseUp
  124.  
  125.  
  126.  
  127. -- part 7 (button)
  128. -- low flags: 00
  129. -- high flags: A004
  130. -- rect: left=276 top=162 right=182 bottom=347
  131. -- title width / last selected line: 0
  132. -- icon id / first selected line: 0 / 0
  133. -- text alignment: 1
  134. -- font id: 3
  135. -- text size: 10
  136. -- style flags: 0
  137. -- line height: 13
  138. -- part name: Change
  139. ----- HyperTalk script -----
  140. on mouseUp
  141.   ParseParam "New name :,Menu name :,Item name :,subItem name :", "New Item,MyMenu,Item 1,SubItem 1.1"
  142. end mouseUp
  143.  
  144.  
  145.  
  146. -- part 8 (button)
  147. -- low flags: 00
  148. -- high flags: A004
  149. -- rect: left=276 top=185 right=205 bottom=347
  150. -- title width / last selected line: 0
  151. -- icon id / first selected line: 0 / 0
  152. -- text alignment: 1
  153. -- font id: 3
  154. -- text size: 10
  155. -- style flags: 0
  156. -- line height: 13
  157. -- part name: Enable
  158. ----- HyperTalk script -----
  159. on mouseUp
  160.   ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
  161. end mouseUp
  162.  
  163.  
  164.  
  165. -- part 9 (button)
  166. -- low flags: 00
  167. -- high flags: A004
  168. -- rect: left=78 top=185 right=205 bottom=149
  169. -- title width / last selected line: 0
  170. -- icon id / first selected line: 0 / 0
  171. -- text alignment: 1
  172. -- font id: 3
  173. -- text size: 10
  174. -- style flags: 0
  175. -- line height: 13
  176. -- part name: Check
  177. ----- HyperTalk script -----
  178. on mouseUp
  179.   ParseParam "Menu name :,Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
  180. end mouseUp
  181.  
  182.  
  183.  
  184. -- part 10 (button)
  185. -- low flags: 00
  186. -- high flags: A004
  187. -- rect: left=78 top=208 right=228 bottom=149
  188. -- title width / last selected line: 0
  189. -- icon id / first selected line: 0 / 0
  190. -- text alignment: 1
  191. -- font id: 3
  192. -- text size: 10
  193. -- style flags: 0
  194. -- line height: 13
  195. -- part name: List
  196. ----- HyperTalk script -----
  197. on mouseUp
  198.   ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,*"
  199. end mouseUp
  200.  
  201.  
  202.  
  203. -- part 11 (button)
  204. -- low flags: 00
  205. -- high flags: A004
  206. -- rect: left=177 top=208 right=228 bottom=248
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 1
  210. -- font id: 3
  211. -- text size: 10
  212. -- style flags: 0
  213. -- line height: 13
  214. -- part name: Find
  215. ----- HyperTalk script -----
  216. on mouseUp
  217.   ParseParam "Item to find :","Item 1"
  218. end mouseUp
  219.  
  220.  
  221.  
  222. -- part 12 (button)
  223. -- low flags: 00
  224. -- high flags: A004
  225. -- rect: left=375 top=162 right=182 bottom=446
  226. -- title width / last selected line: 0
  227. -- icon id / first selected line: 0 / 0
  228. -- text alignment: 1
  229. -- font id: 3
  230. -- text size: 10
  231. -- style flags: 0
  232. -- line height: 13
  233. -- part name: Remove
  234. ----- HyperTalk script -----
  235. on mouseUp
  236.   ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
  237. end mouseUp
  238.  
  239.  
  240.  
  241. -- part 13 (button)
  242. -- low flags: 00
  243. -- high flags: A004
  244. -- rect: left=276 top=208 right=228 bottom=347
  245. -- title width / last selected line: 0
  246. -- icon id / first selected line: 0 / 0
  247. -- text alignment: 1
  248. -- font id: 3
  249. -- text size: 10
  250. -- style flags: 0
  251. -- line height: 13
  252. -- part name: IsChecked
  253. ----- HyperTalk script -----
  254. on mouseUp
  255.   ParseParam "Menu name :,Item name :,subItem name :", "MyMenu,Item 1,SubItem 1.1"
  256. end mouseUp
  257.  
  258.  
  259.  
  260. -- part 14 (button)
  261. -- low flags: 00
  262. -- high flags: A004
  263. -- rect: left=276 top=277 right=297 bottom=347
  264. -- title width / last selected line: 0
  265. -- icon id / first selected line: 0 / 0
  266. -- text alignment: 1
  267. -- font id: 3
  268. -- text size: 10
  269. -- style flags: 0
  270. -- line height: 13
  271. -- part name: Switch
  272. ----- HyperTalk script -----
  273. on mouseUp
  274.   global MenuBarGlobal
  275.   if number of items of MenuBarGlobal ‚↠2
  276.   then ParseParam"About name :,Help name :","About‚Ķ,Help‚Ķ"
  277. else
  278.   put "Menu" && Q("Switch") into cd fld "Cmd"
  279.   DoMEnuXCMD
  280. end if
  281. end mouseUp
  282.  
  283.  
  284.  
  285. -- part 15 (button)
  286. -- low flags: 00
  287. -- high flags: A004
  288. -- rect: left=375 top=208 right=228 bottom=446
  289. -- title width / last selected line: 0
  290. -- icon id / first selected line: 0 / 0
  291. -- text alignment: 1
  292. -- font id: 3
  293. -- text size: 10
  294. -- style flags: 0
  295. -- line height: 13
  296. -- part name: IsEnabled
  297. ----- HyperTalk script -----
  298. on mouseUp
  299.   ParseParam "Menu name :,Item name :,subItem name :", "MyMenu,Item 1,SubItem 1.1"
  300. end mouseUp
  301.  
  302.  
  303.  
  304. -- part 17 (button)
  305. -- low flags: 00
  306. -- high flags: A002
  307. -- rect: left=396 top=299 right=316 bottom=474
  308. -- title width / last selected line: 0
  309. -- icon id / first selected line: 0 / 0
  310. -- text alignment: 1
  311. -- font id: 0
  312. -- text size: 12
  313. -- style flags: 0
  314. -- line height: 16
  315. -- part name: DoField
  316. ----- HyperTalk script -----
  317. on mouseUp
  318.   DoMenuXCMD
  319. end mouseUp
  320.  
  321.  
  322.  
  323. -- part 18 (button)
  324. -- low flags: 00
  325. -- high flags: A004
  326. -- rect: left=375 top=185 right=205 bottom=446
  327. -- title width / last selected line: 0
  328. -- icon id / first selected line: 0 / 0
  329. -- text alignment: 1
  330. -- font id: 3
  331. -- text size: 10
  332. -- style flags: 0
  333. -- line height: 13
  334. -- part name: Disable
  335. ----- HyperTalk script -----
  336. on mouseUp
  337.   ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
  338. end mouseUp
  339.  
  340.  
  341.  
  342. -- part 19 (button)
  343. -- low flags: 00
  344. -- high flags: A004
  345. -- rect: left=177 top=185 right=205 bottom=248
  346. -- title width / last selected line: 0
  347. -- icon id / first selected line: 0 / 0
  348. -- text alignment: 1
  349. -- font id: 3
  350. -- text size: 10
  351. -- style flags: 0
  352. -- line height: 13
  353. -- part name: Uncheck
  354. ----- HyperTalk script -----
  355. on mouseUp
  356.   ParseParam "Menu name :,Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,SubItem 1.1"
  357. end mouseUp
  358.  
  359.  
  360.  
  361. -- part 20 (button)
  362. -- low flags: 00
  363. -- high flags: A004
  364. -- rect: left=78 top=231 right=251 bottom=149
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 0 / 0
  367. -- text alignment: 1
  368. -- font id: 3
  369. -- text size: 10
  370. -- style flags: 0
  371. -- line height: 13
  372. -- part name: GetCmd
  373. ----- HyperTalk script -----
  374. on mouseUp
  375.   ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
  376. end mouseUp
  377.  
  378.  
  379.  
  380. -- part 21 (button)
  381. -- low flags: 00
  382. -- high flags: A004
  383. -- rect: left=177 top=231 right=251 bottom=248
  384. -- title width / last selected line: 0
  385. -- icon id / first selected line: 0 / 0
  386. -- text alignment: 1
  387. -- font id: 3
  388. -- text size: 10
  389. -- style flags: 0
  390. -- line height: 13
  391. -- part name: SetCmd
  392. ----- HyperTalk script -----
  393. on mouseUp
  394.   ParseParam "Cmd char :,Menu name :,Item name :,SubItem name :", "H,MyMenu,Item 1,Subitem 1.1"
  395. end mouseUp
  396.  
  397.  
  398.  
  399. -- part 22 (button)
  400. -- low flags: 00
  401. -- high flags: A004
  402. -- rect: left=276 top=231 right=251 bottom=347
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 0 / 0
  405. -- text alignment: 1
  406. -- font id: 3
  407. -- text size: 10
  408. -- style flags: 0
  409. -- line height: 13
  410. -- part name: GetIcon
  411. ----- HyperTalk script -----
  412. on mouseUp
  413.   ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
  414. end mouseUp
  415.  
  416.  
  417.  
  418. -- part 23 (button)
  419. -- low flags: 00
  420. -- high flags: A004
  421. -- rect: left=375 top=231 right=251 bottom=446
  422. -- title width / last selected line: 0
  423. -- icon id / first selected line: 0 / 0
  424. -- text alignment: 1
  425. -- font id: 3
  426. -- text size: 10
  427. -- style flags: 0
  428. -- line height: 13
  429. -- part name: SetIcon
  430. ----- HyperTalk script -----
  431. on mouseUp
  432.   ParseParam "ICON ID :,Menu name :,Item name :,SubItem name :", "257,MyMenu,Item 1,Subitem 1.1"
  433. end mouseUp
  434.  
  435.  
  436.  
  437. -- part 24 (button)
  438. -- low flags: 00
  439. -- high flags: A004
  440. -- rect: left=78 top=254 right=274 bottom=149
  441. -- title width / last selected line: 0
  442. -- icon id / first selected line: 0 / 0
  443. -- text alignment: 1
  444. -- font id: 3
  445. -- text size: 10
  446. -- style flags: 0
  447. -- line height: 13
  448. -- part name: GetStyle
  449. ----- HyperTalk script -----
  450. on mouseUp
  451.   ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
  452. end mouseUp
  453.  
  454.  
  455.  
  456. -- part 25 (button)
  457. -- low flags: 00
  458. -- high flags: A004
  459. -- rect: left=177 top=254 right=274 bottom=248
  460. -- title width / last selected line: 0
  461. -- icon id / first selected line: 0 / 0
  462. -- text alignment: 1
  463. -- font id: 3
  464. -- text size: 10
  465. -- style flags: 0
  466. -- line height: 13
  467. -- part name: SetStyle
  468. ----- HyperTalk script -----
  469. on mouseUp
  470.   ParseParam "Style : (N B I U O S C E),Menu name :,Item name :,SubItem name :", "BI,MyMenu,Item 1,Subitem 1.1"
  471. end mouseUp
  472.  
  473.  
  474.  
  475. -- part 26 (button)
  476. -- low flags: 00
  477. -- high flags: A004
  478. -- rect: left=276 top=254 right=274 bottom=347
  479. -- title width / last selected line: 0
  480. -- icon id / first selected line: 0 / 0
  481. -- text alignment: 1
  482. -- font id: 3
  483. -- text size: 10
  484. -- style flags: 0
  485. -- line height: 13
  486. -- part name: GetSicn
  487. ----- HyperTalk script -----
  488. on mouseUp
  489.   ParseParam "Menu name :,Item name :,SubItem name :","MyMenu,Item 1,Subitem 1.1"
  490. end mouseUp
  491.  
  492.  
  493.  
  494. -- part 27 (button)
  495. -- low flags: 00
  496. -- high flags: A004
  497. -- rect: left=375 top=254 right=274 bottom=446
  498. -- title width / last selected line: 0
  499. -- icon id / first selected line: 0 / 0
  500. -- text alignment: 1
  501. -- font id: 3
  502. -- text size: 10
  503. -- style flags: 0
  504. -- line height: 13
  505. -- part name: SetSicn
  506. ----- HyperTalk script -----
  507. on mouseUp
  508.   ParseParam "SICN ID :,Menu name :,Item name :,SubItem name :", "257,MyMenu,Item 1,Subitem 1.1"
  509. end mouseUp
  510.  
  511.  
  512.  
  513. -- part 28 (button)
  514. -- low flags: 00
  515. -- high flags: 2000
  516. -- rect: left=16 top=305 right=342 bottom=58
  517. -- title width / last selected line: 0
  518. -- icon id / first selected line: 29114 / 29114
  519. -- text alignment: 1
  520. -- font id: 0
  521. -- text size: 12
  522. -- style flags: 0
  523. -- line height: 16
  524. -- part name: Back
  525. ----- HyperTalk script -----
  526. on mouseUp
  527.   go prev
  528. end mouseUp
  529.  
  530.  
  531.  
  532. -- part 34 (field)
  533. -- low flags: 00
  534. -- high flags: 0007
  535. -- rect: left=42 top=76 right=148 bottom=426
  536. -- title width / last selected line: 0
  537. -- icon id / first selected line: 0 / 0
  538. -- text alignment: 0
  539. -- font id: 3
  540. -- text size: 10
  541. -- style flags: 0
  542. -- line height: 13
  543. -- part name: MenuDef2
  544.  
  545.  
  546. -- part 35 (field)
  547. -- low flags: 81
  548. -- high flags: 2004
  549. -- rect: left=42 top=4 right=149 bottom=428
  550. -- title width / last selected line: 0
  551. -- icon id / first selected line: 0 / 0
  552. -- text alignment: 0
  553. -- font id: 3
  554. -- text size: 10
  555. -- style flags: 0
  556. -- line height: 13
  557. -- part name: Result
  558.  
  559.  
  560. -- part 36 (button)
  561. -- low flags: 80
  562. -- high flags: 2002
  563. -- rect: left=37 top=0 right=12 bottom=49
  564. -- title width / last selected line: 0
  565. -- icon id / first selected line: 0 / 0
  566. -- text alignment: 1
  567. -- font id: 0
  568. -- text size: 12
  569. -- style flags: 0
  570. -- line height: 16
  571. -- part name: Box
  572. ----- HyperTalk script -----
  573. on mouseUp
  574.   hide me
  575.   hide cd fld "REsult"
  576. end mouseUp
  577.  
  578.  
  579.  
  580. -- part 37 (button)
  581. -- low flags: 00
  582. -- high flags: A004
  583. -- rect: left=177 top=277 right=297 bottom=248
  584. -- title width / last selected line: 0
  585. -- icon id / first selected line: 0 / 0
  586. -- text alignment: 1
  587. -- font id: 3
  588. -- text size: 10
  589. -- style flags: 0
  590. -- line height: 13
  591. -- part name: Count
  592. ----- HyperTalk script -----
  593. on mouseUp
  594.   ParseParam "Menu name : (* = all),Item name : (* = all),subItem name : (* = all)", "MyMenu,Item 1,*"
  595. end mouseUp
  596.  
  597.  
  598.  
  599. -- part 38 (button)
  600. -- low flags: 00
  601. -- high flags: A004
  602. -- rect: left=78 top=277 right=297 bottom=149
  603. -- title width / last selected line: 0
  604. -- icon id / first selected line: 0 / 0
  605. -- text alignment: 1
  606. -- font id: 3
  607. -- text size: 10
  608. -- style flags: 0
  609. -- line height: 13
  610. -- part name: ?
  611. ----- HyperTalk script -----
  612. on mouseUp
  613.   ParseParam "Command name :","Switch"
  614. end mouseUp
  615.  
  616.  
  617.  
  618. -- part contents for card part 1
  619. ----- text -----
  620. MyMenu
  621. <Bitem 1<I,subItem 1.1<B,SubItem 1.2<I,<OSubItem 1.3
  622. ^257Item 2,(SubItem 2.1,subItem 2.2,(-,SubItem 2.3
  623. item 3<i
  624. ¨257
  625.  
  626. -- part contents for card part 2
  627. ----- text -----
  628. Menu "Switch"
  629.  
  630. -- part contents for card part 34
  631. ----- text -----
  632. OtherMenu
  633. Styles,Normal,<Bbold,<IItalic,<UUnderline,<OOutline,<SShadow
  634. Big Fred,^257
  635. Small Fred,¬®257
  636.  
  637.  
  638. -- part contents for card part 35
  639. ----- text -----
  640. File,Utilities,Groupies,Markers